package com.yupi.usercenter.base.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
public class BaseVO implements Serializable {
    private static final long serialVersionUID = 1L;

    //(name = "id", value = "id")
    private Long id;

    /**
     * 是否启用
     */
    //(name = "isEnable", value = "是否启用 1启用 2不启用 ")
    private Integer isEnable;

    /**
     * 是否删除
     */
    //(name = "isDelete", value = "是否删除 1未删除 2已删除")
    private Integer isDelete;

    /**
     * 创建人ID
     */
    //(name = "createBy", value = "创建人ID")
    private Integer createBy;

    /**
     * 最后更新人ID
     */
    //(name = "updateBy", value = "最后更新人ID")
    private Integer updateBy;

    /**
     * 创建人名称
     */
    //(name = "createByName", value = "创建人名称")
    private String createByName;

    /**
     * 最后修改人名称
     */
    //(name = "updateByName", value = "最后修改人名称")
    private String updateByName;

    /**
     * 创建时间
     */
    //(name = "createTime", value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    //(name = "updateTime", value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime updateTime;
}
